/*
 * message_app_pause.cpp
 *
 *  Created on: 28 Oca 2012
 *      Author: root
 */

#include "message_activity_pause.h"
#include "../../application.h"

namespace androidplus {
namespace messaging{
namespace activity{

message_activity_pause::message_activity_pause() :message(MSG_ACTIVITY_PAUSE){


}

message_activity_pause::~message_activity_pause() {

}
void message_activity_pause::execute()
{
	LOGI("Activity Pausing");
	     application::cur_app()->cur_activity()->threading_lock_mutex();
	     application::cur_app()->cur_activity()->status.state=androidplus::activity::ACTIVITY_PAUSED;
	     application::cur_app()->cur_activity()->activity_on_pause();
	     application::cur_app()->cur_activity()->threading_condition_broadcast();
	     application::cur_app()->cur_activity()->threading_unlock_mutex();
	     LOGI("Activity Paused");
}

}
}
} /* namespace androidplus */
